import { getChannelAPI } from "@/api/publish"
import { useEffect, useState } from "react"

const useChannelList=()=>{
  const [channelList,setChannel]=useState([])
  useEffect(()=>{
    const  getChannelList=async()=>{
       const res=await getChannelAPI()
       setChannel(res.data.channels)
     }
     getChannelList()
   },[])
   return {
    channelList
   }
}

export {useChannelList}